<template>
  <yy-paging v-model="dataList" @query="queryList" ref="paging" :auto="automatic" @scroll="scroll" :refresher-enabled="false">
    <template #top>
      <u-navbar
        back-text="返回"
        :is-back="false"
        :background="{ backgroundColor: isScroll ? '#FFFFFF' : 'transparent' }"
        :border-bottom="false"
        :custom-style="{ transition: 'background-color 0.3s ease-in-out' }"
      >
      </u-navbar>
    </template>
    <view class="flex flex-col gap-4 p-4">
      <view v-for="(i, k) in 10" :key="k">6666</view>
      <view class="w-full h-[88px] bg-[#F4F6F8] rounded-[8px] overflow-hidden">
        <map :latitude="30.622275" class="!h-[88px] w-full" :longitude="103.976204" :markers="covers"> </map>
      </view>
      <view v-for="(i, k) in 10" :key="k">666996</view>
    </view>
  </yy-paging>
</template>
<script>
  export default {
    data() {
      return {
        isScroll: false,
        dataList: [],
        automatic: false,
        covers: [{ latitude: 30.622275, longitude: 103.976204, iconPath: '/static/location.png' }]
      }
    },
    methods: {
      scroll(e) {
        this.isScroll = e.detail.scrollTop > 0
      },
      async queryList(page, limit) {
        this.$refs.paging.complete([1, 1, 1])
      }
    }
  }
</script>
